package cn.jbolt.ec.route;

import cn.jbolt._admin.interceptor.JBoltAdminAuthInterceptor;
import cn.jbolt.ec.app.EcAppController;
import cn.jbolt.ec.cloud.QnController;
import cn.jbolt.ec.commodity.EcCommodityAuthController;
import cn.jbolt.ec.commodity.EcCommodityController;
import cn.jbolt.ec.commodity.EcCommodityTypeAuthController;
import cn.jbolt.ec.commodity.EcCommodityTypeController;
import cn.jbolt.ec.commodity.*;
import cn.jbolt.ec.coupon.EcRetailerCouponAuthController;
import cn.jbolt.ec.log.OpLogAuthController;
import cn.jbolt.ec.log.StockLogAuthController;
import cn.jbolt.ec.markert.EcMarketRetailerAuthController;
import cn.jbolt.ec.member.EcMemberAuthController;
import cn.jbolt.ec.member.EcMemberController;
import cn.jbolt.ec.order.EcOrderAuthController;
import cn.jbolt.ec.order.EcOrderController;
import cn.jbolt.ec.order.EcPayController;

import cn.jbolt.ec.retailer.EcRetailerAuthController;
import cn.jbolt.ec.retailer.EcRetailerController;
import cn.jbolt.ec.retailer.EcRetailerStaffAuthController;
import cn.jbolt.ec.retailer.EcRetailerTypeAuthController;
import cn.jbolt.ec.rush.EcRushCommodityController;
import cn.jbolt.ec.spreader.EcSpreaderAuthController;
import cn.jbolt.ec.spreader.EcSpreaderController;
import cn.jbolt.ec.sysconfig.EcSysconfigAuthController;
import cn.jbolt.ec.wx.EcWechatController;
import com.jfinal.config.Routes;


/**
 * 加以权限的 routes
 */
public class EcMallAuthRoutes extends Routes {
    @Override
    public void config() {
        this.setBaseViewPath("/mall");
        this.addInterceptor(new JBoltAdminAuthInterceptor());
        /**
         * commodity
         * 商品
         */
        this.add("/auth/mall/commodity", EcCommodityAuthController.class,"/commodity");
        this.add("/auth/mall/type/commodity", EcCommodityTypeAuthController.class,"/commodity_type");

        /**
         * commodity
         * 商家订单
         */
        this.add("/auth/mall/order", EcOrderAuthController.class,"/order");

        /**
         * commodity
         * 商家
         */
        this.add("/auth/mall/retailer", EcRetailerAuthController.class,"/retailer");


        this.add("auth/mall/retailer/type", EcRetailerTypeAuthController.class,"retailer_type");

        /**
         * commodity_staff
         * 商家员工
         */
        this.add("/auth/mall/staff", EcRetailerStaffAuthController.class,"/staff");

        /**
         * member
         * 商家会员
         */
        this.add("/auth/mall/member", EcMemberAuthController.class,"/member");

        /**
         *  rush_commodity
         *  秒杀商品
         */
        this.add("/auth/mall/rush", EcRushCommodityController.class,"/rush");

        /**
         *  retailer_coupon
         *  商家优惠
         */
        this.add("/auth/mall/retailer/coupon", EcRetailerCouponAuthController.class,"/retailer_coupon");



        /**
         * 日志管理
         */
        this.add("/auth/mall/member_log", OpLogAuthController.class,"/member_log");
        this.add("/auth/mall/stock_log", StockLogAuthController.class,"/stock_log");

        /**
         * 分销商管理
         */
        this.add("/auth/mall/spreader", EcSpreaderAuthController.class,"/spreader");

        /**
         * 七牛
         */
        this.add("/auth/mall/Qn", QnController.class,"/");


        this.add("/auth/mall/market", EcMarketRetailerAuthController.class,"/market");


        /**
         * 特价商品管理
         */
        this.add("/auth/mall/special_commodity", EcSpecialCommodityAuthController.class,"/SpecialCommodity");


        this.add("/auth/mall/sysconfig", EcSysconfigAuthController.class,"/sysconfig");



    }
}
